<div class="main_content">
<h1>Listing popsicles</h1>

<table>
  <tr>
    <th>Author</th>
	<th>Content</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @popsicles.each do |popsicle| %>
  <tr>    
    <td><%= !popsicle.public_author_id.nil? ? Entity.find(popsicle.public_author_id).name : 'None' %></td>
    <td><%= popsicle.content %></td>
    <td><%= link_to 'Show', popsicle_path(popsicle) %></td>
    <td><%= link_to 'Edit', edit_popsicle_path(popsicle) %></td>
    <td><%= link_to 'Delete', popsicle_path(popsicle), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Popsicle', new_popsicle_path %>
</div>